/***********************************************************
* Purpose : delete Question 
* Author : NuoiNV
* Date: 10/4/2012
* Description: delete Question
*/
IF EXISTS ( SELECT * FROM SYSOBJECTS WHERE NAME = 'sp_deleteQuestionByID' ) 
BEGIN
	DROP PROC sp_deleteQuestionByID
END
GO
CREATE PROC sp_deleteQuestionByID
	@ID	INT,
	@RESULT INT OUTPUT
AS
	BEGIN 
		IF EXISTS (SELECT * FROM Question  WHERE ID = @ID)
		Begin
			DELETE Question WHERE ID = @ID
			SET @RESULT = 1
		END
		ELSE
		BEGIN
		SET @RESULT = 0
		END
	END 

--SELECT * FROM Question  WHERE ID=1